from django.contrib import admin
from spargameproject.spargame.models import Game, Play, Player, GameMetaData, PlayerMetaData, PlayMetaData, \
    GamePlayerMetaData, GamePlayer

admin.site.register(Player)
admin.site.register(Play)
admin.site.register(GameMetaData)
admin.site.register(PlayerMetaData)
admin.site.register(GamePlayerMetaData)
admin.site.register(GamePlayer)
admin.site.register(PlayMetaData)

class PlayerInline(admin.TabularInline):
  model = GamePlayer

class GameAdmin(admin.ModelAdmin):
  inlines = [PlayerInline]

admin.site.register(Game, GameAdmin)